home *** CD-ROM | disk | FTP | other *** search
/ Netscape Plug-Ins Developer's Kit / Netscape_Plug-Ins_Developers_Kit.iso / CGIPERL / MACPERL / MSRCE418.HQX / Perl Source ƒ / MacPerl / MPUtils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-09  |  2.9 KB  |  118 lines

  1. /*********************************************************************
  2. Project    :    MacPerl            -    Real Perl Application
  3. File        :    MPUtils.h    -
  4. Author    :    Matthias Neeracher
  5.  
  6. A lot of this code is borrowed from 7Edit written by
  7. Apple Developer Support UK
  8.  
  9. Language    :    MPW C
  10.  
  11. $Log: MPUtils.h,v $
  12. Revision 1.1  1994/02/27  23:04:38  neeri
  13. Initial revision
  14.  
  15. Revision 0.4  1993/09/28  00:00:00  neeri
  16. PlotResMiniIcon
  17.  
  18. Revision 0.3  1993/08/17  00:00:00  neeri
  19. DoPrefsDialog
  20.  
  21. Revision 0.2  1993/08/14  00:00:00  neeri
  22. OpenPreferences
  23.  
  24. Revision 0.1  1993/05/29  00:00:00  neeri
  25. Compiles correctly
  26.  
  27. *********************************************************************/
  28.  
  29. #ifndef __MPUTILS__
  30. #define __MPUTILS__
  31.  
  32. #include <Types.h>
  33. #include <QuickDraw.h>
  34. #include <Packages.h>
  35. #include <GestaltEqu.h>
  36. #include <Editions.h>
  37. #include <Printing.h>
  38.  
  39. #ifndef __MPGLOBALS__
  40. #include "MPGlobals.h"
  41. #endif
  42.  
  43. pascal Boolean CheckEnvironment();
  44.  
  45. pascal void ShowError(Str255 theError,
  46.                       long   theErrorCode);
  47.  
  48. pascal Boolean FeatureIsImplemented(OSType theFeature,
  49.                                     short  theTestBit);
  50.  
  51. pascal void GetTempFSSpec(DPtr aDoc, FSSpec * temp);
  52.  
  53. pascal Boolean Ours(WindowPtr aWindow);
  54.  
  55. pascal void SetShortMenus();
  56.  
  57. pascal void SetLongMenus();
  58.  
  59. pascal void SetEditMenu(DPtr theDoc);
  60.  
  61. pascal void AdornDefaultButton(DialogPtr theDialog, short theItem);
  62.  
  63. #if defined(powerc) || defined(__powerc)
  64. extern RoutineDescriptor uDrawDefaultOutline;
  65. extern RoutineDescriptor uSeparator;
  66. #else
  67. pascal void DrawDefaultOutline(DialogPtr theDialog, short theItem);
  68. pascal void Separator(DialogPtr dlg, short item);
  69.  
  70. #define uDrawDefaultOutline *(UserItemUPP)&DrawDefaultOutline
  71. #define uSeparator *(UserItemUPP)&Separator
  72. #endif
  73.  
  74. pascal void RetrieveText(DialogPtr aDialog,
  75.                                                short     anItem,
  76.                                                Str255    aString);
  77.  
  78. pascal void SetText( DialogPtr aDialog,
  79.                                          short     itemNo,
  80.                                          Str255    theString);
  81.  
  82. pascal void GetRectOfDialogItem(DialogPtr theDialog, short theItem, Rect *theRect);
  83.  
  84. #define LesserOf(A,B)    ((A<B) ? A : B)
  85. #define GreaterOf(A,B)    ((A>B) ? A : B)
  86.  
  87. pascal Boolean DoPageSetup(DPtr theDoc);
  88.  
  89. pascal Boolean CtrlKeyPressed(const EventRecord *theEvent);
  90.  
  91. pascal Boolean OptionKeyPressed(const EventRecord *theEvent);
  92.  
  93. pascal void DoAbout();
  94.  
  95. pascal void RegisterDocument(DPtr doc);
  96.  
  97. pascal void UnregisterDocument(DPtr doc);
  98.  
  99. pascal void SetupWindowMenu();
  100.  
  101. pascal void DoSelectWindow(short item);
  102.  
  103. #ifdef RUNTIME
  104. typedef enum {iconPlain, iconGray, iconHilited} IconMode;
  105.  
  106. pascal void PlotResMiniIcon(short id, Rect * within);
  107. pascal void PlotResICN_(short id, Rect * within, IconMode mode);
  108. pascal void Append_DITL(DialogPtr dialog, short item_list_ID);
  109. pascal void Shorten_DITL(DialogPtr dialog, short shorten);
  110. pascal short Count_DITL(DialogPtr dialog);
  111. #endif
  112.  
  113. pascal Boolean WeirdChar(const EventRecord * ev, short modifiers, char ch);
  114.  
  115. pascal Boolean SameFSSpec(FSSpec * one, FSSpec * other);
  116.  
  117. #endif
  118.